import { controller, get, use } from '../decorator'
import { setRenderData } from '../middleware'
import { home } from '../tplConfig'

@controller('/')
export class Home {
  @get('/')
  @use(setRenderData)
  home(req, res) {
    const { renderData } = res
    // 多模板配置
    renderData.qqtCustom.tplConfig = home[renderData.qqtData.detail.tplClass]
    // debugger
    res.render('index', renderData)
  }
}
